/**
 * Copyright 2010-2025 The mTASK Project Authors. All Rights Reserved.
 * Licensed under the MIT License (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.gitee.com/lort/mTask/LICENSE.md
 * Author: luyunyi @luyunyi2019@outlook.com
 */

#ifndef __MTASKLIB_H__
#define __MTASKLIB_H__

#include <mTaskType.h>

#ifdef __cplusplus
extern "C"
{
#endif

#define mTaskMutex_t    pthread_mutex_t

extern int mTaskMutexInit(mTaskMutex_t *mutex);
extern int mTaskMutexLock(mTaskMutex_t *mutex);
extern int mTaskMutexUnlock(mTaskMutex_t *mutex);
extern uint64_t mTaskGetMicroSecond(void);
extern int mTaskSleep(int duration);
extern int mTaskRandBytes(uint8_t *bytes, int len);
extern int mTaskRand(void);

#ifdef __cplusplus
}
#endif


#endif /* MAIN_ELOOP_ELOOP_LOG_H_ */
